﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeFile="GiftCard.aspx.cs" Inherits="Member_GiftCard" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div align="left">
        <b>我的礼品卡:</b><br />
        <asp:Repeater ID="rptGiftcard" runat="server" 
            onitemcommand="rptGiftcard_ItemCommand">
        <HeaderTemplate>
            <table style="width:800px">
            <thead align="left">
            <th>礼品卡编号</th>
            <th>状态</th>
            <th>余额</th>
            <th>起始时间</th>
            <th>是否绑定</th>
            <th>绑定的用户</th>
            </thead>
        </HeaderTemplate>
        <ItemTemplate>
        <tbody>
          <tr>
            <td>
              <asp:LinkButton ID="btnUUID" runat="server" Text='<%# Eval("UUID") %>' CommandName="UUID" CommandArgument='<%# Eval("ID") %>'></asp:LinkButton>
            </td>
            <td>
              <asp:Label ID="lblEnable" runat="server" Text='<%# Eval("Enable") %>'></asp:Label>
            </td>
            <td>
              <asp:Label ID="lblUser" runat="server" Text='<%# Eval("CardPrice") %>'></asp:Label>
            </td>
            <td>
              <asp:Label ID="lblDate" runat="server" Text='<%# Eval("CreateDate","{0:d}") %>'></asp:Label>
            </td>
            <td>
              <asp:Label ID="Label3" runat="server" Text='<%# Eval("IsBound2User") %>'></asp:Label><br />
            </td>
            <td>
              <asp:Label ID="Label2" runat="server" Text='<%# Eval("BoundUserName") %>'></asp:Label><br />
            </td>
          </tr>
          </tbody>
        </ItemTemplate>
        <FooterTemplate>
          </table>
        </FooterTemplate>
        </asp:Repeater>
    </div>
    <div align="left">
        <b>礼品卡使用历史:</b><input id="hidID" type="hidden" runat="server" />
       <asp:ListView ID="lvSendHistory" runat="server" 
                    onpagepropertieschanging="lvSendHistory_PagePropertiesChanging">
        <LayOutTemplate>
            <table style="width:800px">
            <thead align="left">
            <th>礼品卡编号</th>
            <th>金额</th>
            <th>使用时间</th>
            </thead>
            <tbody id="itemPlaceHolder" runat="server">
            </tbody>
            </table>
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lvSendHistory" PageSize="20">
            <Fields>
            <asp:NumericPagerField />
            </Fields>
            </asp:DataPager>
        </LayOutTemplate>
        <ItemTemplate>
          <tr>
            <td>
              <asp:Label ID="lblTitle0" runat="server" Text='<%# Eval("GiftCardID") %>'></asp:Label>
            </td>
            <td>
              <asp:Label ID="Label6" runat="server" Text='<%# Eval("UserPrice") %>'></asp:Label><br />
            </td>
            <td>
              <asp:Label ID="lblDate0" runat="server" Text='<%# Eval("UserDate","{0:d}") %>'></asp:Label>
            </td>
         </tr>
        </ItemTemplate>
        <EmptyDataTemplate>
        没有使用记录!
        </EmptyDataTemplate>
        </asp:ListView>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content_rightarea" Runat="Server">
</asp:Content>

